import QtQuick 1.1
import com.nokia.meego 1.0
import com.nokia.extras 1.0

Rectangle {
    id: container
    signal clicked
    property alias name: settingName.text
    property alias value: colorRect.color
    property color textColor: "white"
    property int leftMargin: 6
    color: mouseArea.pressed ? "grey" : "transparent"

    Label {
        id: settingName
        anchors.left: parent.left
        anchors.leftMargin: container.leftMargin
        anchors.verticalCenter: parent.verticalCenter
        verticalAlignment: Text.AlignVCenter
        font.bold: true
        font.pixelSize: 28
        color: container.textColor
        width: 200
    }
    Rectangle {
        id: colorRect
        height: parent.height
        anchors.left: settingName.right
        anchors.right: moreInd.left
        anchors.verticalCenter: parent.verticalCenter
    }

    MoreIndicator {
        id: moreInd
        anchors.right: parent.right
        anchors.verticalCenter: parent.verticalCenter
    }

    MouseArea {
        id: mouseArea
        anchors.fill: parent
        onClicked: {
            container.clicked()
        }
    }
}
